package org.example.chat.dao;

import org.example.chat.entity.FriendRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface FriendRequestRepository extends JpaRepository<FriendRequest, String> {
    @Query(value = "select fr from #{#entityName} fr where fr.requestUserId = :requestUserId and fr.acceptUserId = :acceptUserId")
    List<FriendRequest> findNoPassByRelation(@Param("requestUserId") String requestUserId, @Param("acceptUserId") String acceptUserId);
}
